has a wide range of operators to act upon scalars. The unary
operators defined on scalars are:
- –
- Unary negation is the highest priority operator.
It is the same as multiplying the expression on the
right of the operator by -1.
- ++
- Increments the operand. Operates on the operand
to the left of the operator. If
the imaginary part of the operand is zero, only the
real part is incremented, otherwise both real and
imaginary parts are incremented.
- – –
- Decrements the operand. Operates on the operand
to the left of the operator. If
the imaginary part of the operand is zero, only the
real part is decremented, otherwise both real and
imaginary parts are decremented.
Lets look at the various binary operations, for A binop B
:
- +
- Adds the operands.
- –
- Subtracts the second operand from the first operand.
- *
- Multiplies the operands together.
- /
- Divides the first operand by the second operand.

- Divides the first operand by the second operand. This
is the same as the right division operator on scalars — it differs only
on matrices.
- ./
- Divides the first operand by the second operand. This
is the same as the right division operator on scalars — it differs only
on matrices.
-
.

- Divides the first operand by the second operand. This
is the same as the right division operator on scalars — it differs only
on matrices.
- .*
- Multiplies the operands together. This is the same
as the
*
operator on scalars — it differs only on matrices.
-
∧
A^B
raises A
to the B
power.
-
.∧
A.^B
raises A
to the
B
power. This is the same as the normal power
operator on scalars — it differs only on matrices.
The operators that are denoted by two symbols should not
have any white space (or any other characters) between the
two symbols.